<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>add</title>
    <!-- 引入样式 -->
    <link rel="stylesheet" href="../plugins/elementui/index.css">
</head>
<body>

<div id="app">

    <el-button type="success" @click="add">成功按钮</el-button>


    <el-dialog
            title="提示"
            :visible.sync="dialogVisible"
            width="30%" >
        <el-form>

            <el-input v-model="user.name"></el-input>
            <el-input v-model="user.age"></el-input>
            <el-input v-model="user.address"></el-input>

            <el-select v-model="user.value" placeholder="请选择">
                <el-option :key="1" :label="1" :value="1"></el-option>
                <el-option :key="2" :label="2" :value="2"></el-option>
                <el-option :key="3" :label="3" :value="3"></el-option>
                <el-option :key="4" :label="4" :value="4"></el-option>
                <el-option :key="5" :label="5" :value="5"></el-option>
            </el-select>


        </el-form>




    <el-button @click="dialogVisible = false">取 消</el-button>
    <el-button type="primary" @click="add2()">确 定</el-button>
  </span>
    </el-dialog>

</div>
<script src="../js/vue.js"></script>
<script src="../plugins/elementui/index.js"></script>

<script>

    new Vue({
        el:"#app",
        data(){
            return{
                dialogVisible:false,
                user:{}
            }
        },methods:{
            add(){

                this.dialogVisible =true;

            }
,
            add2(){

                console.log(this.user);
            }
        }
    })
</script>
</body>

</html>